package org.vaadin.nf4v.core.config.process.parser;

import org.vaadin.nf4v.core.config.ContextConfig;
import org.vaadin.nf4v.core.config.ContextConfigurationException;
import org.vaadin.nf4v.core.config.process.NavigationConfigProcessor;

/**
 * Context configuration parser.
 * <p/>
 * Example usage: to find annotations on window class and apply additional configurations.
 */
public interface ContextConfigParser extends ConfigParser {

    /**
     * Extends context configuration.
     * Processor provided to register handlers.
     * Base navigation configuration may be obtained from processor.
     *
     * @param navigationConfigProcessor navigation configuration processor
     * @param contextConfig             context configuration
     * @throws ContextConfigurationException on configuration error
     */
    void parse(NavigationConfigProcessor navigationConfigProcessor, ContextConfig contextConfig)
            throws ContextConfigurationException;
}
